#ifndef LIBACCENT_FUNCTIONAL_IS_HPP
#define LIBACCENT_FUNCTIONAL_IS_HPP

#include <utility>

namespace accent
{
  namespace detail
  {
    template <typename T>
    class is_predicate
    {
      T stored;
    public:
      is_predicate(T&& stored) : stored(std::move(stored)) {}
      bool operator ()(const T& v) const { return stored == v; }
    };
  }

  template <typename T>
  detail::is_predicate<T> is(T v) { return { std::move(v) }; }
}

#endif
